/*********************************************************
          File Name:vfp.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Sun 13 Sep 2015 03:26:53 PM CST
**********************************************************/

#include <iostream>
#include <vector>
using namespace std;

int fun(int i, int j)
{
        cout << i + j <<endl;
        return i;
}


int main()
{
        //vector<decltype(fun)*>pfun;
        using fp = int (*)(int, int);   // same as above
        vector<fp> pfun;

        for(int i = 0; i < 3; i++)
                pfun.push_back(fun);

        pfun[0](1, 2);
        pfun[1](2, 3);
        pfun[2](3, 4);
}
